<? FoundryView::includeTpl( 'global:header' ) ?>

<?php

	$mNews = FoundryController::model('net.mode3.news:news');
	$mNews->fetchMode = 'OBJECT';
	$news = $mNews->find( '*published = 1 order by *added desc limit 5' );
	
?>


<? foreach( $news as $top ) : ?>
	<h2><?=$top->headline?></h2>
	<p><?=$top->abstract_markdown?></p>
	<div class="readmore"><a href="<?=FoundryView::helperLinkTo( 'news' )?><?=$top->uid?>">Read more...</a></div>
	<br />
	<? if( $top->allow_comments ) : ?>
		Leave a comment
	<? else: ?>
		Comments closed for this post
	<? endif ?>
	
	<? if( $top->comments_total > 0 ) : ?>
		| <?=$top->comments_total?> Comments
	<? endif ?>
	</div><!-- content_area_left -->
	<br /><br />
<? endforeach ?>
</div><!-- content_area_right -->


<? FoundryView::includeTpl( 'global:footer' ) ?>